package com.kclm.xsap.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@TableName("t_global_reservation_set")
@Accessors(chain = true)
public class GlobalReservationSetEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId
	private Long id;

	private Integer startDay;

	private Integer endHour;

	private Integer endDay;

	@DateTimeFormat(pattern = "HH:mm")
	private LocalTime endTime;

	private Integer cancelHour;

	private Integer cancelDay;

	@DateTimeFormat(pattern = "HH:mm")
	private LocalTime cancelTime;

	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime lastModifyTime;

	@Version
	private Integer version= 1;
	//预约开始时间的模式，1：不限制会员可提前预约天数；2：限制天数
	private Integer appointmentStartMode;
	//预约截止时间模式；1：不限制截止时间；2：限制为上课前xx小时；3：限制为上课前xx天xx：xx（时间点）
	private Integer appointmentDeadlineMode;
	//预约取消时间模式；1：不限制取消时间（上课前都可取消）；2：上课前xx小时可取消；3：上课前xx天xx：xx可取消
	private Integer appointmentCancelMode;

}
